/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for FI_SubcontoTypeLine
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_FI_SubcontoTypeLine extends PO implements I_FI_SubcontoTypeLine, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121129L;

    /** the default Constructor */
    public X_FI_SubcontoTypeLine(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_FI_SubcontoTypeLine (Properties ctx, int FI_SubcontoTypeLine_ID, String trxName)
    {
      super (ctx, FI_SubcontoTypeLine_ID, trxName);
      /** if (FI_SubcontoTypeLine_ID == 0)
        {
			setFI_SubcontoTypeLine_ID (0);
        } */
    }

    /** Load Constructor */
    public X_FI_SubcontoTypeLine (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_FI_SubcontoTypeLine[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_ElementValue getAccount() throws RuntimeException
    {
		return (org.compiere.model.I_C_ElementValue)MTable.get(getCtx(), org.compiere.model.I_C_ElementValue.Table_Name)
			.getPO(getAccount_ID(), get_TrxName());	}

	/** Set Account.
		@param Account_ID 
		Account used
	  */
	public void setAccount_ID (int Account_ID)
	{
		if (Account_ID < 1) 
			set_Value (COLUMNNAME_Account_ID, null);
		else 
			set_Value (COLUMNNAME_Account_ID, Integer.valueOf(Account_ID));
	}

	/** Get Account.
		@return Account used
	  */
	public int getAccount_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_Account_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** drcr AD_Reference_ID=1000112 */
	public static final int DRCR_AD_Reference_ID=1000112;
	/** dr = dr */
	public static final String DRCR_Dr = "dr";
	/** cr = cr */
	public static final String DRCR_Cr = "cr";
	/** Set Debet/Credit.
		@param drcr 
		Debet/Credit
	  */
	public void setdrcr (String drcr)
	{

		set_Value (COLUMNNAME_drcr, drcr);
	}

	/** Get Debet/Credit.
		@return Debet/Credit
	  */
	public String getdrcr () 
	{
		return (String)get_Value(COLUMNNAME_drcr);
	}

	public I_FI_SubcontoType getFI_SubcontoType() throws RuntimeException
    {
		return (I_FI_SubcontoType)MTable.get(getCtx(), I_FI_SubcontoType.Table_Name)
			.getPO(getFI_SubcontoType_ID(), get_TrxName());	}

	/** Set FI_SubcontoType_ID.
		@param FI_SubcontoType_ID FI_SubcontoType_ID	  */
	public void setFI_SubcontoType_ID (int FI_SubcontoType_ID)
	{
		if (FI_SubcontoType_ID < 1) 
			set_Value (COLUMNNAME_FI_SubcontoType_ID, null);
		else 
			set_Value (COLUMNNAME_FI_SubcontoType_ID, Integer.valueOf(FI_SubcontoType_ID));
	}

	/** Get FI_SubcontoType_ID.
		@return FI_SubcontoType_ID	  */
	public int getFI_SubcontoType_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_FI_SubcontoType_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set FI_SubcontoTypeLine_ID.
		@param FI_SubcontoTypeLine_ID FI_SubcontoTypeLine_ID	  */
	public void setFI_SubcontoTypeLine_ID (int FI_SubcontoTypeLine_ID)
	{
		if (FI_SubcontoTypeLine_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_FI_SubcontoTypeLine_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_FI_SubcontoTypeLine_ID, Integer.valueOf(FI_SubcontoTypeLine_ID));
	}

	/** Get FI_SubcontoTypeLine_ID.
		@return FI_SubcontoTypeLine_ID	  */
	public int getFI_SubcontoTypeLine_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_FI_SubcontoTypeLine_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}